<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>CatchMusic</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">CatchMusic()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>CatchMusic</b></font>(#Music, *Buffer, Size)</blockquote>

<b>Description</b><br><blockquote>



Loads the specified music from the specified memory buffer. 
<a href="playmusic.html">PlayMusic()</a> can be used to start playing the music. <a href="http://modplug-xmms.sourceforge.net/">ModPlug</a> supports a lot of music formats, which includes: Protracker (4 channels), 
FastTracker (up to 32 channels, 16-bit quality), Impulse Tracker, etc. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Music</i></td>
<td width="90%"> 
 
A number to identify the new music module. 
<a href="../reference/purebasic_objects.html">#PB_Any</a> can be used to auto-generate this number. 

 

</td></tr>
<tr><td><i>*Buffer</i></td>
<td> 
 
The memory buffer to load the music module from. 

 

</td></tr>
<tr><td><i>Size</i></td>
<td> 
 
The buffer size. 

 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Nonzero if the music module has been successfully loaded, zero otherwise. 

 

</blockquote><p><b>Remarks</b></p><blockquote>



This function is useful when using the '<a href="../reference/includes.html">IncludeBinary</a>' PureBasic keyword. Then music modules can be packed inside 
the executable. Nevertheless, use this option with care, as it will take 
more memory than storing the music in an external file (the music is both in 
executable memory and load in physical memory). 

 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">  CatchMusic</font>(0, ?Music, ?MusicEnd-?Music)
  <b><font color="#006666">End</font></b>

  <b><font color="#006666">DataSection</font></b>
    Music: 
      <b><font color="#006666">IncludeBinary</font></b> "Music.xm"
    MusicEnd:
  <b><font color="#006666">EndDataSection</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="loadmusic.html">LoadMusic()</a>, <a href="playmusic.html">PlayMusic()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center><a href=index.html>Music Index</a> - <a href=freemusic.html>FreeMusic()</a> -&gt;



</body></html>